package com.kx.core.jdbc.domain;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Component;

/**
 * 城市实体类
 */
@Component
public class City {
    /**
     * 城市编号
     */
    @NotNull(message="城市编号不能为空")
    private Long id;
    /**
     * 省份编号
     */
    @NotNull(message="省份编号不能为空")
   
    private Long provinceId;
    /**
     * 城市名称
     */
    @NotNull
    @Size(min=2,max=12,message="城市名称必须大于 2 且小于 20 字")
    private String cityName;
    /**
     * 描述
     */
    private String description;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getProvinceId() {
        return provinceId;
    }
    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    
    
}